package cn.edu.sjtu.se.dslab.service;

import java.util.List;
import java.util.Set;

import cn.edu.sjtu.se.dslab.action.bean.PageBean;
import cn.edu.sjtu.se.dslab.auth.User;
import cn.edu.sjtu.se.dslab.exception.DBException;
import cn.edu.sjtu.se.dslab.project.PGroup;
import cn.edu.sjtu.se.dslab.project.Project;
import cn.edu.sjtu.se.dslab.project.UserProject;

public interface IUserProjectService {
	
	public boolean addUserProject(UserProject userProject);

	public boolean deleteUserProjectById(long id);
	
	public boolean deleteUserProject(UserProject userProject);
	
	public List<UserProject>  getListByProject(Project project);
	
	public  List<UserProject>  getListByUser(User user);
	
	public  Set<Project>  getListByUserAndGroup(User user,PGroup group);
	
	public PageBean<UserProject> getPageBeanByProject(int pageNo,Project project) throws DBException;
	
	public boolean updateUserProject(UserProject userProject);

	public List<Project> getProjectListByUser(User user);

	public boolean addUserProjects(long projectId, Long[] userId, Boolean[] admin);

	public boolean deleteUserProjectByIds(Long[] userProjectIds);
}
